﻿@model IEnumerable<VedranKrizicPortfolio.Models.Article>
@{
    ViewBag.Title = "Article List";
}
<div style="padding: 15px;">
    <h2>
        Article List</h2>
    <p style="float: right; clear: right;">
        @Html.ActionLink("New", "NewArticle")
    </p>
    <table style="width: 100%; border-top: 2px solid black;">
        <tr>
            <th>
                Title
            </th>
            <th>
                Type
            </th>
            <th>
                DateAdded
            </th>
            <th>
                PublishDate
            </th>
            <th>
            </th>
        </tr>
        @foreach (var item in Model)
        {
            <tr style="border-bottom: 1px solid #555555;">
                <td>
                    @Html.DisplayFor(modelItem => item.Title)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Type)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DateAdded)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.PublishDate)
                </td>
                <td>
                    @Html.ActionLink("Edit", "ArticleEdit", new { id = item.id }) |
                    @Html.ActionLink("Delete", "ArticleDelete", new { id = item.id })
                </td>
            </tr>
        }
    </table>
    <br />@Html.ActionLink("Back to Administration", "Index")
</div>
 